from src.backend.beanfactory import BeanFactory

def fetch(paras):
    students = BeanFactory.getCursor().query(f'select * from student where 1=1 {paras}')
    return students

def delete(id):
    BeanFactory.getCursor().delete(f'select * from student where id={id}')
    return 'ok'

def insert(object):
    BeanFactory.getCursor().insert(object)